package testrj.sample.web;

import java.lang.reflect.Field;

import testrj.rjson.transformer.FieldBasedTransformer;

public class HttpServletRequestTransformer extends FieldBasedTransformer {
	@Override
	public boolean canHandle(Object object) {
		if(object instanceof javax.servlet.http.HttpServletRequest) {
			return true;
		}
		return false;
	}
	
	@Override
	public boolean include(Field field) {
		String fieldName = field.getName().trim();
		if(fieldName.equals("request") || fieldName.equals("attributes") || fieldName.equals("parameterMap") || fieldName.equals("session")) {
			return true;
		}
		return false;
	}
	
//	@Override
//	public void transform(Object object, Printer printer, Rjson rjson) {
//		printErrorNotImplementedYet(object, printer);
//	}
}